
using System;
using System.Text;
using System.Collections.Generic;
using System.Linq;
using System.Workflow.Runtime;
using System.Threading;
using T2.Logging.Business.Entities.Interfaces;
using T2.Logging.Data.Entities.Interfaces;
using T2.Logging.Data.Entities.Search.Interfaces;
using T2.Logging.Data.Controllers.Interfaces;
using T2.Logging.Data.Controllers;
using T2.Logging.Business.Entities;
using T2.Logging.Business.Entities.Search.Interfaces;
using T2.Logging.Business.Workflow;
using T2.Logging.Business.Directors.Interface;
using T2.Logging.Business.Directors;
using T2.Logging.Business;
//--Change Management Control - Business Service Class  --**********************
//--Created By: trooks
//--Description: Business Service Class
//--Created Date: 03/07/2013 10:05:14
//--*************************************************************

namespace T2.Logging.Business
{
	public partial class BusinessService : IBusinessService
	{
	
		public String ValidationErrors { get; set; }
	public IDictionary<string, int> ApplicationController_Set(IApplication_biz _param) 
		{
			//WorkflowHelper<Workflow_Application, IApplication_biz> wh =
				//new WorkflowHelper<Workflow_Application, IApplication_biz>();
			//Int32 retVal = wh.Execute(_param);
			//return retVal;
			T2.Logging.Business.Commands.Application_Command cmd = new T2.Logging.Business.Commands.Application_Command();
			IDictionary<string,int> r = cmd.Execute(_param);
			//var ret = r.ToList().Select(s  => new {Key=s.Key, Value = s.Value}) ;
			//var retVal = ret.Where(z => z.Key == "Return_Value").Select(m => m.Value);
			//bool retBool = Convert.ToBoolean(retVal);
			return r;
		}

		public List<IApplication_biz> ApplicationController_Get(IApplication_biz _param, Boolean buildUp, Boolean buildDown) 
		{
			IApplication_director_biz cd = new Application_Director_biz();
			List<IApplication_biz> retVal = cd.Construct(_param, buildUp, buildDown);
			return retVal;
		}

		public List<IApplication_biz> ApplicationController_Search(IApplicationSearch_biz _param, Boolean buildUp, Boolean buildDown) 
		{
			IApplication_director_biz cd = new Application_Director_biz();
			List<IApplication_biz> retVal = cd.Construct(_param, buildUp, buildDown);
			return retVal;
		}

		public IDictionary<string, int> LogCategoryController_Set(ILogCategory_biz _param) 
		{
			//WorkflowHelper<Workflow_LogCategory, ILogCategory_biz> wh =
				//new WorkflowHelper<Workflow_LogCategory, ILogCategory_biz>();
			//Int32 retVal = wh.Execute(_param);
			//return retVal;
			T2.Logging.Business.Commands.LogCategory_Command cmd = new T2.Logging.Business.Commands.LogCategory_Command();
			IDictionary<string,int> r = cmd.Execute(_param);
			//var ret = r.ToList().Select(s  => new {Key=s.Key, Value = s.Value}) ;
			//var retVal = ret.Where(z => z.Key == "Return_Value").Select(m => m.Value);
			//bool retBool = Convert.ToBoolean(retVal);
			return r;
		}

		public List<ILogCategory_biz> LogCategoryController_Get(ILogCategory_biz _param, Boolean buildUp, Boolean buildDown) 
		{
			ILogCategory_director_biz cd = new LogCategory_Director_biz();
			List<ILogCategory_biz> retVal = cd.Construct(_param, buildUp, buildDown);
			return retVal;
		}

		public List<ILogCategory_biz> LogCategoryController_Search(ILogCategorySearch_biz _param, Boolean buildUp, Boolean buildDown) 
		{
			ILogCategory_director_biz cd = new LogCategory_Director_biz();
			List<ILogCategory_biz> retVal = cd.Construct(_param, buildUp, buildDown);
			return retVal;
		}

		public IDictionary<string, int> LogController_Set(ILog_biz _param) 
		{
			//WorkflowHelper<Workflow_Log, ILog_biz> wh =
				//new WorkflowHelper<Workflow_Log, ILog_biz>();
			//Int32 retVal = wh.Execute(_param);
			//return retVal;
			T2.Logging.Business.Commands.Log_Command cmd = new T2.Logging.Business.Commands.Log_Command();
			IDictionary<string,int> r = cmd.Execute(_param);
			//var ret = r.ToList().Select(s  => new {Key=s.Key, Value = s.Value}) ;
			//var retVal = ret.Where(z => z.Key == "Return_Value").Select(m => m.Value);
			//bool retBool = Convert.ToBoolean(retVal);
			return r;
		}

		public List<ILog_biz> LogController_Get(ILog_biz _param, Boolean buildUp, Boolean buildDown) 
		{
			ILog_director_biz cd = new Log_Director_biz();
			List<ILog_biz> retVal = cd.Construct(_param, buildUp, buildDown);
			return retVal;
		}

		public List<ILog_biz> LogController_Search(ILogSearch_biz _param, Boolean buildUp, Boolean buildDown) 
		{
			ILog_director_biz cd = new Log_Director_biz();
			List<ILog_biz> retVal = cd.Construct(_param, buildUp, buildDown);
			return retVal;
		}

		public IDictionary<string, int> TenantController_Set(ITenant_biz _param) 
		{
			//WorkflowHelper<Workflow_Tenant, ITenant_biz> wh =
				//new WorkflowHelper<Workflow_Tenant, ITenant_biz>();
			//Int32 retVal = wh.Execute(_param);
			//return retVal;
			T2.Logging.Business.Commands.Tenant_Command cmd = new T2.Logging.Business.Commands.Tenant_Command();
			IDictionary<string,int> r = cmd.Execute(_param);
			//var ret = r.ToList().Select(s  => new {Key=s.Key, Value = s.Value}) ;
			//var retVal = ret.Where(z => z.Key == "Return_Value").Select(m => m.Value);
			//bool retBool = Convert.ToBoolean(retVal);
			return r;
		}

		public List<ITenant_biz> TenantController_Get(ITenant_biz _param, Boolean buildUp, Boolean buildDown) 
		{
			ITenant_director_biz cd = new Tenant_Director_biz();
			List<ITenant_biz> retVal = cd.Construct(_param, buildUp, buildDown);
			return retVal;
		}

		public List<ITenant_biz> TenantController_Search(ITenantSearch_biz _param, Boolean buildUp, Boolean buildDown) 
		{
			ITenant_director_biz cd = new Tenant_Director_biz();
			List<ITenant_biz> retVal = cd.Construct(_param, buildUp, buildDown);
			return retVal;
		}

	}
}
